add_executable (NewSyndrome NewSyndrome.c conf.c init.c module_list.c timeout.c bot.c gestion_module.c kernel_func.c routines.c socket.c userchan_map.c)

link_directories (${NEWSYNDROME_BINARY_DIR}/src/libtd_bdd)
target_link_libraries (NewSyndrome td_bdd)

# pour linux et solaris
set (libdl_exist -NOTFOUND)
find_library (libdl_exist dl)
if (libdl_exist)
	target_link_libraries (NewSyndrome dl)
endif (libdl_exist)

# pour solaris
set (libsocket_exist -NOTFOUND)
find_library (libsocket_exist socket)
if (libsocket_exist)
	target_link_libraries (NewSyndrome socket)
endif (libsocket_exist)

# pour solaris
set (libnsl_exist -NOTFOUND)
find_library (libnsl_exist nsl)
if (libnsl_exist)
	target_link_libraries (NewSyndrome nsl)
endif (libnsl_exist)

# pour bsd, macos et solaris
set (libiconv_exist -NOTFOUND)
find_library (libiconv_exist iconv)
if (libiconv_exist)
	target_link_libraries (NewSyndrome iconv)
endif (libiconv_exist)

# pour zindoz
set (libwsock32_exist -NOTFOUND)
find_library (libwsock32_exist wsock32)
if (libwsock32_exist)
	target_link_libraries (NewSyndrome wsock32)
endif (libwsock32_exist)
